home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Sep 89 / Y0085-Splash Bug-Sep89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.3 KB  |  49 lines  |  [TEXT/GEOL]

  1. Item    2298687                         26-Sept-89        20:28
  2.  
  3. From:   D1220                           Vari-Lite, Andy Meldrum,PRT
  4.  
  5. To:     MACAPP.TEST                     MacApp SQA Team
  6.  
  7. cc:     MACAPP.TECH$                    MACAPP Tech
  8.  
  9. Sub:    Splash Bug
  10.  
  11. There is a bug in the MacApp Globalfunction GetNewCenteredDialog. Here is the
  12. original, plus fix.
  13.  
  14. FUNCTION GetNewCenteredDialog(dialogID: INTEGER; dStorage: Ptr; behind:
  15. WindowPtr): DialogPtr;
  16.  
  17.     VAR
  18.         dlogTemplate:        DialogTHndl;
  19.  
  20.     BEGIN
  21.     (* !!! Nil out the returned Value for good luck & that sort of thing *)
  22.              GetNewCenteredDialog := NIL;
  23.     (* !!! All better now  *)
  24.  
  25.         SetCursor(arrow);
  26.         SetEmptyRgn(gCursorRgn);                            { Make sure it gets changed back }
  27.         dlogTemplate := DialogTHndl(GetResource('DLOG', dialogID));
  28.         IF dlogTemplate <> NIL THEN
  29.                  BEGIN
  30.                      CenterRectOnScreen(dlogTemplate^^.boundsRect, TRUE, TRUE, TRUE);
  31.                      GetNewCenteredDialog := GetNewDialog(dialogID, dStorage,
  32. behind);
  33.                  END
  34.         ELSE
  35.                 BEGIN
  36.                     SysBeep(2);                                     { At least give some indication }
  37.            {$IFC qDebug}
  38.                     ProgramBreak(ConcatNumber('Unable to find ‘DLOG’ resource ',
  39.             dialogID));
  40.                 {$ENDC}
  41.                END;
  42.     END;
  43.  
  44. If I wasn't so cack handed with Rez I'd never have found this !!
  45.  
  46. Andy.
  47.  
  48.  
  49.